// pages/index/index.ts
Page({
  onShareAppMessage() {
    return {
      title: '信息系统项目管理师备考指南',
      path: '/pages/index/index',
      imageUrl: '' // 可以设置分享图片路径
    }
  },

  onShareTimeline() {
    return {
      title: '信息系统项目管理师备考指南',
      query: ''
    }
  },

  goToExam() {
    // debugger
    wx.navigateTo({
      url: 'pages/exam/exam-index/exam-index'
    })
  },
  
  startPlan() {
    wx.switchTab({
      url: '/pages/exam/exam-index/exam-index',
      success: (res) => {
        console.log('navigateTo success', res);
      },
      fail: (err) => {
        console.error('navigateTo fail', err);
      }
    })
  },
  goToStudyPlan() {
    wx.navigateTo({
      url: '/pages/home/plan/plan'
    })
  },
  goToKnowledge() {
    console.log("goToKnowledge")
    wx.navigateTo({
      url: '/pages/home/knowledge/knowledge'
    })
  },
  goToExperienceShare(){
    wx.navigateTo({
      url: '/pages/home/experience/experience'
    })
  }
})